Introduction
The following is a tentative outline of the AppleEvents and AppleEvent Objects Eudora will support.

Object Definitions
The following define objects in Eudora that can be manipulated via AppleEvents.  These objects can be manipulated with the events described in “Event Definitions” below, and also with most of the applicable events in the Core Suite.

Mail Folder Object	
This is the top of the message container hierarchy for Eudora.  It specifies a folder wherein a mailbox resides.
Class:	cEuMailfolder
Superclass:	cObject
Default Type:	typeAlias

Properties:
pEuTopLevel	typeBoolean	Is this folder the top level active Eudora folder?
pEuFSS	typeFSS	File System Specification for folder.
pName	typeChar	Name of the folder, or “” for root folder

Elements:
cEuMailbox		The mailboxes contained in this folder.
cEuMailfolder		The mail folders contained in this folder.

Mailbox Object
This object represents a single mailbox.
Class:	cEuMailbox
Superclass:	cOpenableObject
Default Type:	typeAlias

Properties:
pEuMailboxType	typeEnumeration	kRegular, kIn, kOut, kTrash
pEuWasteSpace	typeLongInteger	Amount of space wasted.
pEuNeededSpace	typeLongInteger	Amount of space needed by messages in mailbox.
pEuFSS	typeFSS	File System Specification for mailbox.
pEuTOCFSS	typeFSS	File System Specification for .toc file.

Elements:
cEuMessage		The messages in the mailbox.

Events Currently Supported:
kAEOpen	formName	Opens the mailbox.
kAEGetData	all properties
kAECreateElement	cEuMessage	Out mailbox only; creates new message.  Does not support optional parameters; use kAESetData.
kAECountElements	cEuMessage	Returns # of messages in mailbox.

Message Object
This type represents a single message.
Class:	cEuMessage
Superclass:	cOpenableObject
Default Type:	typeText

Properties:
pEuPriority	typeInteger	Message priority,1-200  (Levels in program are 40 (Highest), 80 (High), 120 (Normal), 160 (Low), 200 (Lowest).  0 is synonymous with 120.
pEuStatus	typeEnumeration	kUnread, kRead, kReplied, kForwarded, kRedirected, kSent, kUnsent, kSendable, kUnsendable.
pEuSender	typeText	Sender as displayed in summary.
pEuDate	typeLongInteger	Message timestamp, in seconds since 1904 (UTC).
pEuZone	typeLongInteger	Message offset from UTC.
pEuSize	typeLongInteger	Size of message, in bytes.  Includes normally weeded headers.
pEuSubject	typeText	Subject as displayed in message summary.
pEuOutgoing	typeBoolean	Is the message outgoing?
pEuSignature	typeBoolean	Include signature?
pEuWrap	typeBoolean	Word wrap?
pEuFakeTabs	typeBoolean	Do the tab thing?
pEuKeepCopy	typeBoolean	Keep copy?
pEuHqxText	typeBoolean	BinHex text attachments?

Elements:
cText		The entire text of the message.
cEuField		Fields in the message.

Events Currently Supported:
kAEOpen	formAbsolutePosition	Opens the message.
kAEGetData	all properties
kAESetData	all properties that make sense
kAEMove	formAbsolutePosition	Transfers the message.

Field Object
This describes a single field in a message.
Class:	cEuField
Superclass:	cText
Default Type:	typeText

Properties:
pName	typeText	Name of the field.

Elements:
cEuText		The text of the field (sans header).

Events Currently Supported:
kAEGetData		Gets field name and contents as a text string.
kAESetData		Sets field contents (composition only).

Event Definitions
These are events unique to Eudora.  Eudora also accepts events from the Required and Core suites.

Request Mail Notification Event
This event allows the client application to request that Eudora notify it when mail arrives.
Class:	kEudoraSuite
Event:	kEuPleaseNotify

Parameters:
keyDirectObject	typeAlias	The application to notify
keyEuNotify	typeBoolean	Whether or not to notify (optional, True assumed)

Mail Notification Event
Eudora uses this event to notify a client application that mail has arrived.  It also may be generated by the user, if he wants the client  to (re)process selected messages.
Class:	kEudoraSuite
Event:	kEuNotify

Parameters:
keyEuMessageList	typeAEDescList	List of message objects of newly-arrived messages.

Reply Event
Reply to a message.
Class:	kEudoraSuite
Event:	kEuReply

Parameters:
keyDirectObject	typeObjectSpecifier	The message to which to reply.
keyEuToWhom	typeAEDescList	The addresses to which to reply. (not yet supported)
keyEuReplyAll	typeBoolean	Reply to all recipients (optional; default to Switches... setting)
keyEuIncludeSelf	typeBoolean	Include self if reply all (optional; default to Switches... setting)
keyEuQuoteText	typeBoolean	Should we quote the message text? (optional; default to True)

Reply Parameters:
keyDirectObject	typeObjectSpecifier	The reply message generated.

Forward Event
Forward a message.
Class:	kEudoraSuite
Event:	kEuForward

Parameters:
keyDirectObject	typeObjectSpecifier	The message to forward.
keyEuToWhom	typeAEDescList	The addresses to send the forward to (optional, not yet supported).

Reply Parameters:
keyDirectObject	typeObjectSpecifier	The forward message generated.

Redirect Event
Redirect a message.
Class:	kEudoraSuite
Event:	kEuRedirect

Parameters:
keyDirectObject	typeObjectSpecifier	The message to redirect.
keyEuToWhom	typeAEDescList	The addresses to send the redirect to (optional, not yet supported).

Reply Parameters:
keyDirectObject	typeObjectSpecifier	The redirect message generated.

Salvage Event (Send Again)
Salvage a bounced message.
Class:	kEudoraSuite
Event:	kEuSalvage

Parameters:
keyDirectObject	typeObjectSpecifier	The message to salvage.
keyEuToWhom	typeAEDescList	The addresses to send the salvaged message to (optional, not yet supported).

Reply Parameters:
keyDirectObject	typeObjectSpecifier	The salvage message generated.

Attach Document Event
Attach a document to a message.
Class:	kEudoraSuite
Event:	kEuAttach

Parameters:
keyDirectObject	typeObjectSpecifier	The message to which the document should be attached.
keyEuDocumentList	typeAEDescList	The documents to attach.  Must be alias records.
Queue Event 
Change the queueing of a message.  Note that the keyEuQueue parameter is optional; if not specified, it obeys the Immediate Send option.

Class:	kEudoraSuite
Event:	kEuQueue

Parameters:
keyDirectObject	typeObjectSpecifier	The message to queue.
keyEuQueue	typeEnumeration	kEuSendNow, kEuSendNext, kEuSendLater, kEuSendNever (optional, defaults to Switches... setting).
keyEuWhen	typeLongInteger	When the message should be sent, seconds local time (optional).

Connect-Up Event
This event instructs Eudora to deliver or pickup mail.  If neither keyEuSend or keyEuCheck is specified, a mail check is done, possibly sending mail as well (depending on the setting of the “Send On Check” switch).
Class:	kEudoraSuite
Event:	kEuConnect

Parameters:
keyEuSend	typeBoolean	Send queued messages now? (optional)
keyEuCheck	typeBoolean	Check for new mail now? (optional)

Constants

cEuMailfolder	'euMF'	/* folder for mailboxes and mail folders */
pEuTopLevel	'euTL'	/* is top-level of Eudora Folder? */
pEuFSS	'euFS'	/* FSSpec for mailbox/folder */

cEuMailbox	'euMB'	/* mailbox */
pEuMailboxType	'euMT'	/* kIn, kOut, kTrash, kRegular */
pEuWasteSpace	'euWS'	/* space wasted in mailbox, bytes */
pEuNeededSpace	'euNS'	/* space needed by messages in mailbox */
pEuTOCFSS	'eTFS'	/* FSS for toc file (pEuFSS is for mailbox) */

cEuMessage	'euMS'	/* message */
pEuPriority	'euPY'	/* priority */
pEuStatus	'euST'	/* message status */
pEuSender	'euSe'	/* sender */
pEuDate	'euDa'	/* date */
pEuSize	'euSi'	/* size */
pEuSubject	'euSu'	/* subject */
pEuOutgoing	'euOu'	/* outgoing? */
pEuSignature	'eSig'	/* signature? */
pEuWrap	'eWrp'	/* wrap? */
pEuFakeTabs	'eTab'	/* fake tabs? */
pEuKeepCopy	'eCpy'	/* keep copy? */
pEuHqxText	'eXTX'	/* Always as documents? */
pEuAttachType	'eATy'	/* attachment type:
		   0 double, 1 single, 2 hqx, 3 uuencode */
pEuShowAll	'eBla'	/* show all headers? */

cEuField	'euFd'	/* field in message */

cEuTEInWin	'EuWT'	/* text field in a window */
cEuWTEText	'eWTT'	/* text a text field */

kEudoraSuite	'CSOm'	/* Eudora suite */
kEuNotify	'eNot'	/* New mail has arrived */
keyEuNotify	'eNot'	
kEuPleaseNotify	'ePNo'	/* request notification */
keyEuMessList	'eMLs'	/* Message list */

kEuReply	'eRep'	/* Reply */
keyEuReplyAll	'eRAl'	/* Reply to all? */
keyEuIncludeSelf	'eSlf'	/* Include self? */
keyEuQuoteText	'eQTx'	/* Quote original message text? */

kEuForward	'eFwd'	/* Forward */

kEuRedirect	'eRdr'	/* Redirect */

kEuSalvage	'eSav'	/* Salvage a message (send again) */

kEuAttach	'eAtc'	/* Attach a document */
keyEuDocumentList	'eDcl'	/* List of dox to attach */

kEuQueue	'eQue'	/* Queue a message */
keyEuQueue	'eQTp'	/* Queue type */
kEuSendNow	0	/* send now */
kEuSendNext	1	/* send next time queued */
kEuSendLater	2	/* send later (use keyEuWhen) */
kEuSendNever	3	/* don’t send */
keyEuWhen	'eWhn'	/* When to send message, seconds local time */

kEuConnect	'eCon'	/* Connect (send/queue) */
keyEuSend	'eSen'	/* send queued messages */
keyEuCheck	'eChk'	/* check mail */

kIn	6220	/* In mailbox */
kOut	6805	/* Out mailbox */
kTrash	7412	/* Trash mailbox */
kRegular	0

Real Work with Eudora AppleEvents
This section describes how to accomplish common tasks with Eudora using AppleEvents.  Events are beneath single arrows (), replies beneath double arrows ().  Replies are omitted where they simply indicate success or failure.  Not all the AppleEvent bookkeeping details are represented here.  Data values in “”’s represent text passed between the programs.  Values in «»’s are object specifiers.  These may be either “magic” items of meaning only to Eudora (for example, message object specifiers sent with a mail notification event), or they may be constructed by the client application (for example, specifying a mailbox named  “Trash”), or even a combination of returned and manufactured objects (for example, the priority property [manufactured] of a message [returned]).

Sending a Mail Message
The goal here is simply to send a message.
Client	Eudora

kCreateElement	«Out mailbox»

keyDirectObject	 «message»

kAESetData	«to: field»
keyAEData	“sdorner@qualcomm.com”
...

kEuQueue
keyDirectObject	«message»
keyEuQueue	kEuSendNow

Request Notification
Tell Eudora you want to know when mail arrives.
Client	Eudora

kEuPleaseNotify	«alias of app to notify»

Examine Incoming Mail
Mail has arrived; the client application wishes to do some processing on the new mail.
Client	Eudora

kEuMailNotify
keyEuMessageList	«msg1»,«msg2»,«msg3»

kAEGetData
keyDirectObject	«msg1«pEuSender»»

keyAEResult	“listserv@vmd.cso.uiuc.edu”

kAEMove
keyDirectObject	«msg1»
keyAEInsertHere	keyAEObject: «Trash»
	keyAEPosition: kAEEnd

kAEGetData
keyDirectObject	«msg2«pEuSender»»

keyAEResult	“sdorner@qualcomm.com”

kAESetData
keyDirectObject	«msg2«pEuPriority»»
keyAEData	50

kAEGetData
keyDirectObject	«msg3«pEuSender»»

keyAEResult	“barlow@eff.org”

kAEGetData
keyDirectObject	«msg3«pEuSubject»»

keyAEResult	“Message Assistant”

kEuReply
keyDirectObject	«msg3»
keyEuReplyAll	false
keyEuQuoteText	false

keyDirectObject	«new msg»

kAESetData
keyDirectObject	«new msg«body»»
keyAEData	“For information regarding Message Assistant, please send mail to Message-Assistant@uiuc.edu.”